package fr.umlv.escapeir.weapon;

import java.awt.Image;

import org.jbox2d.collision.shapes.Shape;
import org.jbox2d.common.Vec2;

import fr.umlv.escapeir.ship.Ship;

abstract class WeaponFactoryDescription {
	protected Image image;
	protected Image icon;
	protected Shape shape;
	protected Vec2 topLeft;
	protected Vec2 bottomRight;
	
	Image image() {return image;}
	Image icon() {return icon;}
	Shape shape() {return shape;}
	Vec2 topLeft() {return topLeft;}
	Vec2 bottomRight() {return bottomRight;}
}

public class WeaponFactory {
	
	public static Weapon create(WeaponType type, Ship ship) {
		switch (type) {
		case FIREBALL:
			return new Fireball(ship, ship.group());
		case LASER:
			return new Laser(ship, ship.group());
		case MISSILE:
			return new Missile(ship, ship.group());
		case SHIBOLEET:
			return new Shiboleet(ship, ship.group());
		default:
			return new FakeWeapon(ship);
		}
	}

}
